import { Router, Redirect, Route, Switch } from 'react-router-dom'
import Login from './pages/Login'
import Layout from '@/pages/Layout'
import './App.scss'
import { customHistory } from './utils/history'
const App = () => {
  return (
    <Router history={customHistory}>
      <div className="app">
        <Switch>
          <Route
            exact
            path="/"
            render={() => {
              return <Redirect to="/login"></Redirect>
            }}
          ></Route>
          <Route path="/home" component={Layout}></Route>
          <Route path="/login" component={Login}></Route>
        </Switch>
      </div>
    </Router>
  )
}
export default App
